/* 
 * $Id$
 *
 * UMKC Robotics 2009
**/

#ifndef ATMEGA128_H
#define ATMEGA128_H

#include <stdint.h>
#include <avr/io.h>

#include "intdefs.h"


/* These are for the LCD and came from the original LCD.h file */
#define  LCD_EON               PORTC |= (1<<2)
#define  LCD_EOFF              PORTC &= ~(1<<2)
#define  LCD_RSON              PORTC |= (1<<0)
#define  LCD_RSOFF             PORTC &= ~(1<<0)
#define  LCD_CHAR_SPEED        (uint8_t) 2
#define  LCD_TIMEOUT           (uint8_t) 250  
#define  LCD_DISP_ON           (uint8_t) 0x0C /* 00001100 */
#define  LCD_DISP_OFF          (uint8_t) 0x08 /* 00001000 */ 
#define  LCD_CLR_DISP          (uint8_t) 0x01 /* 00000001 */
#define  LCD_CUR_HOME          (uint8_t) 0x02 /* 00000010 */
#define  LCD_ENTRY_INC         (uint8_t) 0x06 /* 00000110 */
#define  LCD_DD_RAM_ADDR       (uint8_t) 0x80 /* 10000000 */
#define  LCD_DD_RAM_ADDR2      (uint8_t) 0xC0 /* 11000000 */
#define  LCD_DD_RAM_ADDR3      (uint8_t) 40   /* odd place for decimal */     
#define  LCD_CG_RAM_ADDR       (uint8_t) 0x40 /* 01000000 */ 



void mega128_init();


#endif
